from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait

from common.comvariable import driver_path_chrome

import time

driver=webdriver.Chrome(executable_path=driver_path_chrome)


driver.get("https://www.ctrip.com/")
driver.maximize_window()
element=WebDriverWait(driver,10).until(lambda x:x.find_element_by_css_selector("#float_100_close"))
driver.execute_script("arguments[0].click()",element)
driver.find_element_by_css_selector("#searchBoxUl>li:nth-child(6)").click()
time.sleep(4)
#单程时，返程时期是灰色的
driver.find_element_by_css_selector("#searchTicket").click()
time.sleep(2)
ele=driver.find_element_by_xpath("//div[text()='请输入出发城市名称']")
assert




time.sleep(6)